package cn.tedu.system.service.impl;

import cn.tedu.system.mapper.HandlersMapper;
import cn.tedu.system.pojo.param.HandlerAddParam;
import cn.tedu.system.pojo.po.HandlerPO;
import cn.tedu.system.service.HandlersService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IHandlersService implements HandlersService {
    @Autowired
    HandlersMapper mapper;

    @Override
    public Integer addNew(HandlerAddParam param) {
        HandlerPO handlerPO=new HandlerPO();
        BeanUtils.copyProperties(param,handlerPO);
        int insert = mapper.insert(handlerPO);
        return insert;
    }
}
